class Solution:
    def twoSum(self, numbers, target: int):
        i = 0
        j = len(numbers) - 1
        while i < j:
            if numbers[i] + numbers[j] == target:
                return [i+1, j+1]
            elif numbers[i] + numbers[j] < target:
                i += 1
            else:
                j -= 1


if __name__ == '__main__':
    so = Solution()
    numbers = [2, 7, 11, 15]
    target = 9
    r = so.twoSum(numbers, target)
    print(r)
